<?php
include_once('./source/class/class_core.php');
include_once('./source/function/function_core.php');
$discuz = C::app();
$discuz->init();

if($_GET['step'] == 'upgrade'){
DB::query("INSERT INTO ".DB::table('common_setting')." VALUES ('kyehani_seopack','')");
DB::query("REPLACE INTO ".DB::table('common_stylevar')." (`stylevarid`, `styleid`, `variable`, `substitute`) VALUES
(1, 1, 'menuhoverbgcolor', '#F4F6F8'),
(2, 1, 'lightlink', '#FFF'),
(3, 1, 'floatbgcolor', '#FFF'),
(4, 1, 'dropmenubgcolor', '#FEFEFE'),
(5, 1, 'floatmaskbgcolor', '#000'),
(6, 1, 'dropmenuborder', '#DDD'),
(7, 1, 'specialbg', '#E5EDF2'),
(8, 1, 'specialborder', '#C2D5E3'),
(9, 1, 'commonbg', '#F2F2F2'),
(10, 1, 'commonborder', '#CDCDCD'),
(11, 1, 'inputbg', '#FFF'),
(12, 1, 'stypeid', '1'),
(13, 1, 'inputborderdarkcolor', '#848484'),
(14, 1, 'headerbgcolor', '#0096C4'),
(15, 1, 'headerborder', '0'),
(16, 1, 'sidebgcolor', '#FFF vlineb.png repeat-y 0 0'),
(17, 1, 'msgfontsize', '14px'),
(18, 1, 'bgcolor', '#F4F6F8'),
(19, 1, 'noticetext', '#F26C4F'),
(20, 1, 'highlightlink', '#369'),
(21, 1, 'link', '#333'),
(22, 1, 'lighttext', '#999'),
(23, 1, 'midtext', '#666'),
(24, 1, 'tabletext', '#444'),
(25, 1, 'smfontsize', '0.83em'),
(26, 1, 'threadtitlefont', 'Tahoma,Helvetica,sans-serif'),
(27, 1, 'threadtitlefontsize', '13px'),
(28, 1, 'smfont', 'Tahoma,Helvetica,sans-serif'),
(29, 1, 'titlebgcolor', '#E5EDF2 titlebg.png repeat-x 0 0'),
(30, 1, 'fontsize', '12px/1.5'),
(31, 1, 'font', 'Tahoma,Helvetica,sans-serif'),
(32, 1, 'styleimgdir', ''),
(33, 1, 'imgdir', ''),
(34, 1, 'boardimg', 'logo.png'),
(35, 1, 'available', ''),
(36, 1, 'headertext', '#444'),
(37, 1, 'footertext', '#666'),
(38, 1, 'menubgcolor', '#3B5998'),
(39, 1, 'menutext', '#FFF'),
(40, 1, 'menuhovertext', '#666666'),
(41, 1, 'wrapbg', '#FFF'),
(42, 1, 'wrapbordercolor', '#CCC'),
(43, 1, 'contentwidth', '630px'),
(44, 1, 'contentseparate', '#C2D5E3'),
(45, 1, 'inputborder', '#E0E0E0')");
$done = "Upgrade thành công! Hãy xóa file này!";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Update db cho DiscuzX2.5 Thuần Việt</title>
<style>
*{padding: 0; margin:0; font-family: Verdana;}
.wp{margin: 0 auto; width: 500px;}
.hd{height: 58px; background: #F47D22;}
.page{background: #2C85EE;height: 100px;}
a,p{color: #FFF;}
a.click{font-weight: bold; font-size: 18px;}
</style>
</head>
<div class="wp">
<div class="hd">
<h2 class="logo"><img src="http://discuz.vn/static/image/common/logo.png" alt="discuzvn"/></h2></div>
<div class="page">
<p>Hãy chắc chắn file này được upload vào thư mục root ngang index.php</p></br>
<a class="click" href="dcv_update.php?step=upgrade">[Bấm vào đây để cài đặt]</a>
<?php if($done){ echo $done;};?>
</div>
</div>
<body>
</body>
</html>
